<?php
	header("Content-Type: text/html;charset=utf-8");
	include("function/_nosql.php"); //
	include("function/function.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>目的地足迹_<?= $web_titles ?></title>
<meta name="Keywords" content="目的地足迹,<?= $web_keywords ?>" />
<meta name="Description" content="<?= $web_description ?>" />
<link rel="stylesheet" href="css/common.css"/>
<link rel="stylesheet" href="css/style.css"/>
</head>
<body>
    <!--top-bar begin-->
	<? include("_include.top.topbar.php") ?>
    <!--top-bar end-->
    <!--header begin-->
	<? include("_include.top.navbar.php") ?>
    <!--header end-->
    <!--banner begin-->
    <div class="inner-banner">
        <div class="inner-pic"><img src="images/ban2.jpg" alt=""/></div>
    </div>
    <!--banner end-->
    <!--活动 begin-->
    <div class="f-item-box np">
        <div class="content">
            <div class="bd-content">
                <div class="con-pane on">
                    <div class="mdd-box">
                        <div class="hot-line">
                            <div class="show-hot-line">
							
						<?php
								$SQL = "";
								$pagesize = 10; // 分页数量
								$pageval = chkstr(trim($_REQUEST['page'])); // 获取Page的值
								if($pageval){
									if(!is_numeric($pageval)){
										echo erro("Page Error");
									}
									if($pageval <= 1){
										$pageval = 1;
									}
									$page = ($pageval-1) * $pagesize;
									$page .= ",";
								}else{
									$pageval = 1;
								}
								
								$pagesql = "select * from kboy_trailfoot order by id desc";

								$pagenum = mysql_num_rows(mysql_query($pagesql)); // 总记录数
								$pagecount = ceil($pagenum/$pagesize); // 共分多少页
								if($pageval > $pagecount){
									$pageval = $pagecount;
								}
								
								$news_sql = $pagesql." limit $page $pagesize";
								$news_rows = mysql_query($news_sql);
								$i = 1;
								while($news_rs = mysql_fetch_array($news_rows)){
						?>
                                <div class="hot-line-item">
                                    <div class="line-item-l">
                                        <ul>
                                            <li><a href="trailfootview.php?newsid=<?=$news_rs['id']?>" target="_blank"><img src="<?=$news_rs['trailfoot_pic2']?>" width="135" height="91" alt=""></a></li>
                                            <li><a href="trailfootview.php?newsid=<?=$news_rs['id']?>" target="_blank"><img src="<?=$news_rs['trailfoot_pic3']?>" width="135" height="91" alt=""></a></li>
                                            <li><a href="trailfootview.php?newsid=<?=$news_rs['id']?>" target="_blank"><img src="<?=$news_rs['trailfoot_pic4']?>" width="135" height="91" alt=""></a></li>
                                        </ul>
                                    </div>
                                    <div class="line-item-r">
                                        <h3 class="title"><a href="trailfootview.php?newsid=<?=$news_rs['id']?>" target="_blank"><?=$news_rs['trailfoot_title']?></a></h3>
                                        <div class="line-detail">
                                            <p><span><?=$news_rs['trailfoot_line']?></span><span><?=$news_rs['trailfoot_allline']?></span></p>
                                            <p><span>海拔最低：<?=$news_rs['trailfoot_baltitude']?></span><span>最高：<?=$news_rs['trailfoot_taltitude']?></span><span>难度级别：<?=$news_rs['trailfoot_power']?></span></p>
                                        </div>
                                        <div class="editor-inner"><span class="editor">作者：<a href="javascript:void(0);"><?=$news_rs['trailfoot_writer']?></a></span><span class="date"><?=date('Y-m-d',strtotime($news_rs['trailfoot_addtime']))?></span><div class="show-pl"><span class="watch"><i></i><?=$news_rs['trailfoot_hit']?></span><span class="pl"><i></i><?=getNewsNums("kboy_trailfoot_message","newsid=".$news_rs['id'])?></span></div></div>
                                    </div>
                                </div>
						<?php
								} // while 完毕
						?>
								
                            </div>
						<?php
								if($pagenum > $pagesize){
									echo "<div class=\"pagination\"><ul>";
									$url = "trailfoot.php?";//当前页面
									pagebar($pagecount, $pageval, 7, $url);
									echo "</ul></div>";
								}
						?>
                        </div>   
						
						<? include("_include.trail.footright.php") ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--foot begin-->
	<? include("_include.bottom.footbar.php") ?>
    <!--foot begin-->
    <!--左侧悬浮 begin-->
	<? include("_include.bottom.leftbar.php") ?>
    <!--左侧悬浮 end-->
    <!--右侧悬浮导航 begin-->
	<? include("_include.bottom.rightbar.php") ?>
    <!--右侧悬浮导航 end-->
    <script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="js/jquery.SuperSlide.2.1.1.js"></script>
    <script type="text/javascript" src="js/main.js"></script>
</body>
</html>
